﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="admin.ascx.cs" Inherits="OffersAdmin" %>
<%@ Register Assembly="alexconsult" Namespace="Jungle.Alex.WebControls" TagPrefix="AWC" %>
<%@ Register Src="~/Modules/OfferManager/Controls/forms/Flat.ascx" TagName="FlatForm" TagPrefix="AddForms" %>
<%@ Register Src="~/Modules/OfferManager/Controls/forms/Commercial.ascx" TagName="CommForm" TagPrefix="AddForms" %>
<%@ Register Src="~/Modules/OfferManager/Controls/forms/House.ascx" TagName="HouseForm" TagPrefix="AddForms" %>
<%@ Register Src="~/Modules/OfferManager/Controls/forms/Garage.ascx" TagName="GarageForm" TagPrefix="AddForms" %>
<%@ Register Src="~/Modules/OfferManager/Controls/forms/Ground.ascx" TagName="GroundForm" TagPrefix="AddForms" %>
<%@ Register Src="~/Modules/OfferManager/Controls/ShowOffer.ascx" TagName="ShowOffer" TagPrefix="AUC" %>


<style>
    .tbl0001
    {
        width: 600px;
        margin: 3px;
    }

    .tbl0001 td
    {
        padding: 3px;
        vertical-align: top;
        border: 2px solid #eee;
    }
</style>
<asp:MultiView ID="OfferMenu" runat="server">
    <asp:View ID="v0" runat="server">
        <AWC:OfferListByAutor ID="OfferListByAutor1" runat="server" />
    </asp:View>
    <asp:View ID="v1" runat="server">
        <div id="div_Show" style="position: absolute; top: 50px; left: 50px; display: none;">
            <img id="img_Show" style="border: 5px solid #FFF; cursor: pointer;" onclick="Show(this);" />
        </div>    
        <strong>Данные о заявке:</strong><br/>
        <asp:Label ID="lb_OfferInfo" runat="server"/>
        <AUC:ShowOffer ID="ShowOffer1" Visible="false" runat="server" />
        <br />
        <asp:Image ID="img_1" onclick="Show(this);" Visible="false" style="cursor: pointer; border: 3px solid #fff;" runat="server" />
        <asp:Image ID="img_2" onclick="Show(this);" Visible="false" style="cursor: pointer; border: 3px solid #fff;" runat="server" />
        <asp:Image ID="img_3" onclick="Show(this);" Visible="false" style="cursor: pointer; border: 3px solid #fff;" runat="server" />
        <asp:Image ID="img_4" onclick="Show(this);" Visible="false" style="cursor: pointer; border: 3px solid #fff;" runat="server" />
        <asp:Image ID="img_5" onclick="Show(this);" Visible="false" style="cursor: pointer; border: 3px solid #fff;" runat="server" />
        <asp:Image ID="img_6" onclick="Show(this);" Visible="false" style="cursor: pointer; border: 3px solid #fff;" runat="server" />  
        <br />      
        <asp:ImageButton ID="btn_ConfirmOffer" OnClick="ConfirmOffer" ToolTip="Добавить заявку в базу" runat="server" ImageUrl="~/Admin/img/save.jpg" />
    </asp:View>
    <asp:View ID="v2" runat="server">
        
    </asp:View>    
    <asp:View ID="v3" runat="server">
        <AddForms:FlatForm ID="FlatForm1" Visible="false" runat="server" />
        <AddForms:CommForm id="CommForm1" Visible="false" runat="server" />
        <AddForms:HouseForm id="HouseForm1" Visible="false" runat="server" />
        <AddForms:GarageForm id="GarageForm1" Visible="false" runat="server" />
        <AddForms:GroundForm id="GroundForm1" Visible="false" runat="server" />
    </asp:View>           
</asp:MultiView>

<script language="javascript">
    function Show(el)
    {
        var ff = document.getElementById('div_Show');
        if(ff.style.display != "none" && el.id == "img_Show")
        {
            ff.style.display = "none";
        }
        else
        {
            ff.style.display = "";
            document.getElementById('img_Show').src = el.src;
        }

        
    }
</script>